import Vue from 'vue'
import VueRouter from 'vue-router'
import Nav from '../views/Nav.vue'


Vue.use(VueRouter)
const routes = [
  {
    path: '/',
    name: 'Nav',
    redirect:"/home",
    component: Nav,
    children:[
      {
        path: '/home',
        name: 'Home',
        component:() => import('../views/Home.vue')

      },
      {
        path:"/fen",
        name:"Fen",
        component:() => import('../views/Fen.vue')

      },
     {
        path:"/my",
        name:"My",
        component:() => import('../views/My.vue')
      },
      {
        path:"/cart",
        name:"cart",
        component:() => import('../views/Cart.vue')
      }

    ]
  },
  {
    path:"/deng",
    name:"deng",
    component:() => import('../views/Deng.vue')
  },
  {
    path:"/ce",
    name:"ce",
    component:() => import('../views/Ce.vue')
  },
  {
    path:"/wang",
    name:"wang",
    component:() => import('../views/Wang.vue')
  },
  {
    path:"/productdetails",
    name:"productdetails",
    component:() => import('../components/home/Productdetails.vue')
  },
  {
    path:"/articleDetails",
    name:"articleDetails",
    component:() => import('../components/home/ArticleDetails.vue')
  },
  {
    path:"/gooddetails",
    name:"gooddetails",
    component:() => import('../components/home/Gooddetails.vue')
  },
  {
    path:"/choiceness",
    name:"choiceness",
    component:() => import('../components/home/Choiceness.vue')
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
